import request from '@/utils/request'

/**
 * 搜索词审核 列表
 * @param {{
 *  search_keyword: string
 *  status: DEFAULT_SWITCH_VALUE
 * }} data
 * @returns
 */
export function searchList(data) {
  return request({
    url: '/tax.search',
    method: 'post',
    data
  })
}

/**
 * 搜索词 新增
 * @param {{
 *  search_keyword: string
 *  bind_brand_id: number
 *  bind_product_id: number
 *  bind_tariff_id: number
 *  bind_hscode_id: number
 *  goods_img: string
 *  status: DEFAULT_SWITCH_VALUE
 * }} data
 * @returns
 */
export function addSearchWord(data) {
  return request({
    url: '/tax.search/handleAdd',
    method: 'post',
    data
  })
}

/**
 * 搜索词 编辑
 * @param {{
 *  search_id: number
 *  search_keyword: string
 *  bind_brand_id: number
 *  bind_product_id: number
 *  bind_tariff_id: number
 *  bind_hscode_id: number
 *  goods_img: string
 *  status: DEFAULT_SWITCH_VALUE
 * }} data
 * @returns
 */
export function editSearchWord(data) {
  return request({
    url: '/tax.search/handleEdit',
    method: 'post',
    data
  })
}

/**
 * 搜索词 修改状态
 * @param {{
 *  search_id: number
 *  search_keyword: string
 *  status: DEFAULT_SWITCH_VALUE
 * }} data
 * @returns
 */
export function changeSearchWordStatus(data) {
  return request({
    url: '/tax.search/handleStatus',
    method: 'post',
    data
  })
}

// export function deleteSearchWord(data) {
//   return request({
//     url: '/tax.search/handleDel',
//     method: 'post',
//     data
//   })
// }
